From: emellor@ewan Date: Wed, 21 Sep 2005 14:12:32 +0000 (+0100) Subject: Match change to the memory/target value, as it is now in KiB, not bytes. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16780^2~17 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1fe49007f3af282380409e4ec6efca69e24699b6;p=xen.git Match change to the memory/target value, as it is now in KiB, not bytes. Signed-off-by: Ewan Mellor --- diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index 521252c8ce..d720e7d2ea 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -362,7 +362,10 @@ static void watch_target(struct xenbus_watch *watch, const char *node) return; } - set_new_target(new_target >> PAGE_SHIFT); + /* The given memory/target value is in KiB, so it needs converting to + pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. + */ + set_new_target(new_target >> (PAGE_SHIFT - 10)); }